/*
 * Copyright 2008 Jiri Janak
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.floorballcoaches.exercisedrawer;

import com.floorballcoaches.exercisedrawer.objects.Exercise;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;

/**
 *
 * @author Jiri Janak
 */
public class Pokus {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        PersistanceTools p = new PersistanceTools();
        

        BufferedImage itemImage;
        File itemImageFile = new File("D:\\veverka.jpg");
        try {
            itemImage = ImageIO.read(itemImageFile);

            BufferedImage resultImage = new BufferedImage(700, 700, BufferedImage.TYPE_INT_RGB);
            Graphics2D gfx = resultImage.createGraphics();
            //gfx.drawImage(itemImage, 250, 250, null);
            //gfx.drawImage(GraphicsTools.colorOverlay(itemImage, Color.yellow), 300, 300, null);
            gfx.drawImage(GraphicsTools.rotate(itemImage, 90), 0, 0, null);
            //gfx.drawImage(GraphicsTools.rotate(itemImage, 45), 300, 300, null);
            

            File pngfile = new File("D:\\output.png");
            ImageIO.write(resultImage, "png", pngfile);

        } catch (IOException ex) {
            Logger.getLogger(Exercise.class.getName()).log(Level.SEVERE, null, ex);
        }

    }
}
